﻿using System.Data.Entity.ModelConfiguration;
using RealtReview.DataAccess.Entities;

namespace RealtReview.DataAccess.Mappings
{
    public class ReviewMap : EntityTypeConfiguration<Review>
    {
        public ReviewMap()
        {
            HasRequired(x => x.Apartment)
                .WithMany(x => x.Reviews)
                .HasForeignKey(x => x.ApartmentId);
        }
    }
}